﻿<%@ Page Title="Giỏ hàng" Language="vb" AutoEventWireup="false" MasterPageFile="~/Master/OutSite.Master" CodeBehind="Cart.aspx.vb" Inherits="Core.Cart1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="boxPro">
	<div class="boxNew_header">Giỏ hàng của bạn</div>
    <asp:GridView ID="gridCart" runat="server" class="tblMain" AutoGenerateColumns="false" GridLines="None" DataKeyNames="IdCart" HeaderStyle-Height="25px">
        <EmptyDataTemplate>
            <asp:Label ID="lblEmptySearch" runat="server" ForeColor="Red">Giỏ hàng của bạn chưa có sản phẩm nào !!!</asp:Label>
        </EmptyDataTemplate>
        <Columns>
            <asp:TemplateField HeaderText="No.">
                <ItemTemplate>
                    <asp:Label Visible="false" runat="server" ID="lbl_ID" Text='<%#Eval("IdCart") %>'></asp:Label>
                    <asp:Label runat="server" ID="lblSTT" Text='<%#Container.DataItemIndex + 1 %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Width="30px" HorizontalAlign="Center" />
                <ItemStyle Width="30px" HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Ảnh SP" Visible="true">
                <ItemTemplate>
                    <asp:Image ID="imgProImage" runat="server" Height="30" ImageUrl='<%#Eval("ProImg") %>' CssClass="imgCart"/>
                </ItemTemplate>
                <HeaderStyle Width="100px" HorizontalAlign="Left" />
                <ItemStyle Width="100px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Tên sản phẩm">
                <ItemStyle Width="230px" />
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblName" Text='<%#Eval("ProName") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Left" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Số lượng">
                <ItemStyle Width="100px" />
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblQuantity" Text='<%#Eval("Quantity") %>'></asp:Label>
                    <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" CommandName="Edit" ImageUrl="~/static/outSite/images/pencil.png" Height="24px" CssClass="noneCSS"/>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox runat="server" ID="txtQuantity" Text='<%#Eval("Quantity") %>' Width="25px" CssClass="cartTxtPrice"></asp:TextBox>
                    <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="True" CommandName="Update" ImageUrl="~/static/inSite/images/save.png" CssClass="cartBtnPrice"/>
                    <asp:ImageButton ID="ImageButton2" runat="server" CausesValidation="False" CommandName="Cancel" ImageUrl="~/static/inSite/images/stop.png" CssClass="cartBtnPrice"/>
                </EditItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
                <HeaderStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Thành tiền">
                <ItemStyle Width="230px" />
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblTotal" Text='<%# formatVND(Eval("Total"))%>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Width="70px" HorizontalAlign="Right" />
                <ItemStyle Width="70px" HorizontalAlign="Right" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Xóa" ShowHeader="False" HeaderStyle-HorizontalAlign="Right" ItemStyle-Width="20"> 
                <ItemTemplate> 
                    <asp:ImageButton ID="butDelete" runat="server" CausesValidation="False" CommandName="Delete" ImageUrl="~/static/outSite/images/subtract_from_cart.png" Width="24px" CssClass="noneCSS" />
                </ItemTemplate> 
                <HeaderStyle HorizontalAlign="Center" ForeColor="Black"></HeaderStyle>
                <ItemStyle Width="40px" HorizontalAlign="Center"></ItemStyle>
            </asp:TemplateField> 
        </Columns>
    </asp:GridView>
    <div class="detailPromo">
		<div class="header" style="text-align: left;padding-left: 5px;">Tổng giá trị đơn hàng: <div class="totalBill" id="totalBill" runat="server">0 VND</div></div>
	</div>			
    <div class="frmPay">
        <input type="button" Class="btnPay" onclick="window.location='/Pay.aspx'" />
    </div>
</div>
</asp:Content>
